package com.sinosoft.sinopay.apiservice.allinpay.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

import com.sinosoft.sinocloud.platform.common.util.PropertiesUtil;

public class PropertiesUtils {

	/** 
     * @Fields prop
     */
    private static Properties prop = new Properties();

    /**
     * 根据key读取对应的value
     * @param key
     * @return
     */
    public static Properties readProperties(String filePath) {
        try {
            InputStream in = PropertiesUtil.class.getResourceAsStream(filePath);
            BufferedReader bf = new BufferedReader(new InputStreamReader(in));
            prop.load(bf);
            return prop;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}
